package com.zhuiYun.project.api.shoppingcart.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @ClassName: ShoppingCartEntity
 * @descriptions: 购物车实体类
 * @Author: zq
 * @Date 2023/4/5 21:00
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Table(name="shopping_cart")
public class ShoppingCartEntity implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 加入购物车时间
     */
    private Date addToCartDate;

    /**
     * 购买人id
     */
    private Integer userId;

    /**
     * 商品id
     */
    private Integer commodityId;

    /**
     * 商家名称
     */
    private String businessName;

    /**
     * 商品总价
     */
    private BigDecimal totalPrices;

    /**
     * 退换货政策
     */
    private String returnAndExchangePolicy;

    /**
     * 商品数量
     */
    private Integer number;
    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 修改时间
     */
    private Date updateTime;

    /**
     * 逻辑删除
     */
    private Integer delFlag;

    /**
    * 商品属性
    */
    private String commoditySpec;

    /**
     * 是DIY还是商品（0为不是 1为是）
     */
    private Integer isNoDiy;

    /**
     * DIY的id
     */
    private Integer diyId;

    private String flag;
}
